<?php
namespace app\common\model;

class AuthGroupModel extends BaseModel
{
    protected $name = 'auth_group'; //定义用户表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = []; //修改
    protected $type = [];

    protected function getStatusTextAttr($value, $data)
    {
        $status = [0 => '<span class="label label-warning">禁用</span>',
                   1 => '<span class="label label-primary">启用</span>'];
        return $status[$data['status']];
    }
}




